package com.gopay.common.trace;


import org.springframework.util.StopWatch;

/**
 * @author ddh02
 * @LogConstans
 * @2017/4/7 15:03  www.gopay.com.cn Inc.All rights reserved.
 */


public class LogConst {
    public static final String TID = "tid";

    public static final String SPANID = "spanid";

    public static final String SPANNAME = "spanname";

    /**获取参数中的orderId**/
    public static final String ORDER_ID = "orderId";

    //add by zyt, 2017-12-28，该标签代表springmvc中，将tid放入session
    public static final String PUT_TID_IN_SESSION = "1";

    public static void main(String[] args) throws InterruptedException {

        //多阶段 统计比较适合
        /*
        StopWatch '': running time (millis) = 2024
        -----------------------------------------
        ms     %     Task name
        -----------------------------------------
        01001  049%  aaa
        01023  051%  bbb
         */
        /*StopWatch sw = new StopWatch();

        sw.start("aaa");
        Thread.sleep(1000);
        sw.stop();
        sw.start("bbb");
        Thread.sleep(1000);
        sw.stop();

        System.out.println(sw.prettyPrint());*/

    }
}
